package com.magic.zhixin.repository;

import com.magic.zhixin.entity.Question;
import com.magic.zhixin.entity.UserQuestion;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface QuestionRepository extends JpaRepository<Question,Long>{
    List<Question> findByQuestionBankId(Long questionBankId);

    Question findByIdIs(Long question);

    Question findTop1ByQuestionBankIdAndIdGreaterThan(Long questionBankId,Long questionId);

    Question findByQuestionBankIdAndTitleAndCreateUserId(Long questionBankId, String questionTitle, Long id);
}
